const path = require('path');

const fpath = 'a/b/c/index.html';

const ftext = path.extname(fpath)
console.log(ftext);